package com.fasteat.mall.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.util.Date;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * <p>
 * 
 * </p>
 *
 * @author hy
 * @since 2021-01-19
 */
@TableName("t_mall_orderform")
@ApiModel(value="TMallOrderform对象", description="")
public class Orderform implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "订单id")
    @TableId(value = "id", type = IdType.ID_WORKER_STR)
    private String id;

    @ApiModelProperty(value = "用户id")
    private String userId;

    @ApiModelProperty(value = "商品id")
    private String productId;

    @ApiModelProperty(value = "购买数量")
    private Integer purchaseAmount;

    @ApiModelProperty(value = "收货地址id")
    private String addressId;

    @ApiModelProperty(value = "订单状态：1-未付款、2-已付款未发货、3-已发货、4-待评价、5-已完成")
    private Integer orderStatus;

    @ApiModelProperty(value = "售后状态，1:申请退款 2:已同意退款、3:已退款、4:拒绝退款")
    private Integer aftersalesStatus;

    @ApiModelProperty(value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private Date gmtCreate;

    @ApiModelProperty(value = "修改时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date gmtModified;

    @ApiModelProperty(value = "逻辑删除,是1、否0")
    @TableField(fill = FieldFill.INSERT)
    private Integer isDeleted;

    @ApiModelProperty(value = "乐观锁")
    @Version
    @TableField(fill = FieldFill.INSERT)
    private Integer version;

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getProductId() {
        return productId;
    }

    public void setProductId(String productId) {
        this.productId = productId;
    }

    public Integer getPurchaseAmount() {
        return purchaseAmount;
    }

    public void setPurchaseAmount(Integer purchaseAmount) {
        this.purchaseAmount = purchaseAmount;
    }

    public String getAddressId() {
        return addressId;
    }

    public void setAddressId(String addressId) {
        this.addressId = addressId;
    }

    public Integer getOrderStatus() {
        return orderStatus;
    }

    public void setOrderStatus(Integer orderStatus) {
        this.orderStatus = orderStatus;
    }

    public Integer getAftersalesStatus() {
        return aftersalesStatus;
    }

    public void setAftersalesStatus(Integer aftersalesStatus) {
        this.aftersalesStatus = aftersalesStatus;
    }

    public Date getGmtCreate() {
        return gmtCreate;
    }

    public void setGmtCreate(Date gmtCreate) {
        this.gmtCreate = gmtCreate;
    }

    public Date getGmtModified() {
        return gmtModified;
    }

    public void setGmtModified(Date gmtModified) {
        this.gmtModified = gmtModified;
    }

    public Integer getIsDeleted() {
        return isDeleted;
    }

    public void setIsDeleted(Integer isDeleted) {
        this.isDeleted = isDeleted;
    }

    public Integer getVersion() {
        return version;
    }

    public void setVersion(Integer version) {
        this.version = version;
    }

    public Orderform(String id, String userId, String productId, Integer purchaseAmount, String addressId, Integer orderStatus, Integer aftersalesStatus, Date gmtCreate, Date gmtModified, Integer isDeleted, Integer version) {
        this.id = id;
        this.userId = userId;
        this.productId = productId;
        this.purchaseAmount = purchaseAmount;
        this.addressId = addressId;
        this.orderStatus = orderStatus;
        this.aftersalesStatus = aftersalesStatus;
        this.gmtCreate = gmtCreate;
        this.gmtModified = gmtModified;
        this.isDeleted = isDeleted;
        this.version = version;
    }

    public Orderform() {
    }
}
